package bean;

import java.util.ArrayList;
import java.util.Objects;

public class Course {
    private String cno;
    private String cname;
    private String credit;
    private String ctime;
    private String quota;

    public Course() {
        super();
    }

    public Course(String cno, String cname, String credit, String ctime, String quota) {
        this.cno = cno;
        this.cname = cname;
        this.credit = credit;
        this.ctime = ctime;
        this.quota = quota;
    }

    public String getCno() {
        return cno;
    }

    public Course setCno(String cno) {
        this.cno = cno;
        return this;
    }

    public String getCname() {
        return cname;
    }

    public Course setCname(String cname) {
        this.cname = cname;
        return this;
    }

    public String getCredit() {
        return credit;
    }

    public Course setCredit(String credit) {
        this.credit = credit;
        return this;
    }

    public String getCtime() {
        return ctime;
    }

    public Course setCtime(String ctime) {
        this.ctime = ctime;
        return this;
    }

    public String getQuota() {
        return quota;
    }

    public Course setQuota(String quota) {
        this.quota = quota;
        return this;
    }

    @Override
    public String toString() {
        return "course{" +
                "cno='" + cno + '\'' +
                ", cname='" + cname + '\'' +
                ", credit='" + credit + '\'' +
                ", ctime='" + ctime + '\'' +
                ", quota='" + quota + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Course)) return false;
        Course course = (Course) o;
        return cno.equals(course.cno) && cname.equals(course.cname);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cno, cname);
    }

    public static void main(String[] args) {

    }
}
